﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

// 掌握控件的anchor visible 属性
namespace DO_YOU_LOVE_ME
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        Random rd = new Random();
        private void button_DisAgree_MouseEnter(object sender, EventArgs e)
        {        
            Point pt = new Point();
            pt.X = rd.Next(0, this.ClientSize.Width - button_DisAgree.Width+1);
            pt.Y = rd.Next(0, this.ClientSize.Height - button_DisAgree.Height + 1);
            button_DisAgree.Location = pt;
        }
    }
}
